package com.zhaochao;

import java.io.IOException;
import java.util.Properties;

/**
 * Hello world!
 */
public class Main {
    public Properties properties;

    public String loadProperties(String key) throws IOException {
        if (properties == null) {
            properties = new Properties();
            properties.load(this.getClass().getClassLoader().getResourceAsStream("System.properties"));
        }
        return properties.getProperty(key);
    }

    public static void main(String[] args) throws IOException {
        Main main = new Main();
        System.out.println(main.loadProperties("app.mode"));
    }
}
